<?php
global $references;
$references = array(

	"validator.numberValue" => array(
		"class" => "Pageley_Domain_Validator_NumberValue"
	),
	
	"validator.positiveInteger" => array(
        "class" => "Pageley_Domain_Validator_NumberValue",
        "properties" => array(
            "minValue" => 1,
	        "integer" => true
        )
    ),
	
	"validator.required" => array(
		"class" => "Pageley_Domain_Validator_Required"
	),
	
	"validator.length3" => array(
		"class" => "Pageley_Domain_Validator_Length",
		"properties" => array(
			"maxLength" => 3
		)
	),
	
	"validator.length16" => array(
		"class" => "Pageley_Domain_Validator_Length",
		"properties" => array(
			"maxLength" => 16
		)
	),
	
	"validator.length32" => array(
		"class" => "Pageley_Domain_Validator_Length",
		"properties" => array(
			"maxLength" => 32
		)
	),
	
	"validator.length64" => array(
		"class" => "Pageley_Domain_Validator_Length",
		"properties" => array(
			"maxLength" => 64
		)
	),
    
    "validator.length128" => array(
        "class" => "Pageley_Domain_Validator_Length",
        "properties" => array(
            "maxLength" => 128
        )
    ),
	
	"validator.length256" => array(
		"class" => "Pageley_Domain_Validator_Length",
		"properties" => array(
			"maxLength" => 256
		)
	),
	
	"validator.emailAddress" => array(
		"class" => "Pageley_Domain_Validator_Expression",
		"constructor" => array(
			"pattern" => "^[\w-.]+@[\w-]+(\.[\w-]+)+$"
		),
		"properties" => array(
			"invalidMessage" => "error.validation.invalidEmailAddress"
		)
	),
	
	"validator.url" => array(
		"class" => "Pageley_Domain_Validator_Expression",
		"constructor" => array(
			"pattern" => "^[\w]+:.*$"
		),
		"properties" => array(
			"invalidMessage" => "error.validation.invalidUrl"
		)
	),
	
	"validator.phoneNumber" => array(
		"class" => "Pageley_Domain_Validator_Expression",
		"constructor" => array(
			"pattern" => "^\+?[\d]+([\s-./\(\)][\d]+)*$"
		),
		"properties" => array(
			"invalidMessage" => "error.validation.invalidPhoneNumber"
		)
	),
	
	"validator.image" => array(
		"class" => "Pageley_Domain_Validator_File",
		"properties" => array(
			"mimeTypes" => array("image/jpeg", "image/gif", "image/png"),
            "maxSize" => "1048576",
			"invalidMimeTypeMessage" => "error.validation.invalidImage"
		)
	)
    	
);